//
//  HomeHeaderView.swift
//  SwiftProject
//
//  Created by wwj on 16/2/24.
//  Copyright © 2016年 wwj. All rights reserved.
//

import UIKit

class HomeHeaderView: UICollectionReusableView {
    
    private let pageScrollViewH:CGFloat = 115.0
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        addPageScrollView()
        addHoteView()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //MARK:添加轮播图
    private func addPageScrollView(){
       let pageScrollView = PageScrollView()
        backgroundColor = UIColor.whiteColor()
        pageScrollView.frame = CGRectMake(0, 0, self.frame.size.width, pageScrollViewH)
        self.addSubview(pageScrollView)
        
    }
    
    private func addHoteView(){
        let hoteView = HomeHoteView()
        hoteView.frame = CGRectMake(0, pageScrollViewH, SCREEN_WITH, self.frame.size.height-pageScrollViewH)
        addSubview(hoteView)
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
    }
}
